﻿Public Class Cliente

    Private mstrPrimeiroNome As String = String.Empty
    Private mstrSegundoNome As String = String.Empty
    Private mstrUltimoNome As String = String.Empty
    Private mstrEmail As String = String.Empty
    Private mstrDocumento As String = String.Empty
    Private mstrDDD As String = String.Empty
    Private mstrTelefone As String = String.Empty
    Private mstrCep As String = String.Empty

    Public Property PrimeiroNome As String
        Get
            Return mstrPrimeiroNome
        End Get
        Set(ByVal value As String)
            mstrPrimeiroNome = value
        End Set
    End Property

    Public Property SegundoNome As String
        Get
            Return mstrSegundoNome
        End Get
        Set(ByVal value As String)
            mstrSegundoNome = value
        End Set
    End Property

    Public Property UltimoNome As String
        Get
            Return mstrUltimoNome
        End Get
        Set(ByVal value As String)
            mstrUltimoNome = value
        End Set
    End Property

    Public Property Email As String
        Get
            Return mstrEmail
        End Get
        Set(ByVal value As String)
            mstrEmail = value
        End Set
    End Property

    Public Property Documento As String
        Get
            Return mstrDocumento
        End Get
        Set(ByVal value As String)
            mstrDocumento = value
        End Set
    End Property

    Public Property DDD As String
        Get
            Return mstrDDD
        End Get
        Set(ByVal value As String)
            mstrDDD = value
        End Set
    End Property

    Public Property Telefone As String
        Get
            Return mstrTelefone
        End Get
        Set(ByVal value As String)
            mstrTelefone = value
        End Set
    End Property

    Public Property Cep As String
        Get
            Return mstrCep
        End Get
        Set(ByVal value As String)
            Try
                If Not IsNumeric(value) Then
                    Throw New Exception("Valor inválido")
                End If
                mstrCep = value
            Catch objErro As Exception
                Throw objErro
            End Try
        End Set
    End Property

End Class